﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

// THis file contains all the list items classes (li) for each of the 3 data types that require lists
// liDataItems - Base Class
// liPreachers - The preacher class
// liRecording -- THe information about the recordings
// liSubCategory -- The information about the subcategories

namespace SermonEditor
{
    public class liDataItems
    {
        public frmMain frm;
        public string TableName;
        public int RowIdx;

        public string GetValue(string column)
        {
            return "";
            //return global.dsRecords.Tables[TableName].Rows[RowIdx][column].ToString();
        }

        public void SetValue(string column, string value)
        {
            return;
            //global.dsRecords.Tables[TableName].Rows[RowIdx][column] = value;
        }
    }

    public class liPreachers : liDataItems
    {
        public liPreachers(int pIdx)
        {
            TableName = "Preachers";
            RowIdx = pIdx;
        }


        public override string ToString()
        {
            return GetValue("name");
        }
    }

    public class liRecordings : liDataItems
    {
        public liRecordings(int pIdx)
        {
            TableName = "Recordings";
            RowIdx = pIdx;
        }

        public override string ToString()
        {
            return GetValue("title");
        }
    }

    public class liSubCategories : liDataItems
    {
        public liSubCategories(int pIdx)
        {
            TableName = "Subcategories";
            RowIdx = pIdx;
        }

        public override string ToString()
        {
            return GetValue("name");
        }
    }
}
